package com.palm.web.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.palm.dao.entity.Car;
import com.palm.dao.entity.Driver;

@Controller
public class DriverController {

	
	@RequestMapping(value = "/driver_list", method = RequestMethod.GET)
	public String list(Model model) {
		model.addAttribute("title", "司机管理");
		model.addAttribute("groupTitle", "司机列表");
		List<Driver> driverList = new ArrayList<Driver>() {

			private static final long serialVersionUID = 1L;
			{
				add(new Driver("张三", "18086047775", "男", "420116198504301723"));
				add(new Driver("李四", "18627091310", "女", "420116198609301927"));
			}
		};
		
		model.addAttribute("driverList", driverList);

		return "driver_list";
	}
	
}
